<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/17
 * Time: 18:25
 */

echo "<title>12-2 设置cookie</title>";
echo "<p style='text-align: center'><a href=\"index.php\"><font size=\"4\">目录</font></a></p>";
header("Content-type: text/html; charset=utf-8");
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";

$value = time();
//在这里设置一个名为test的cookie
setcookie('test',$value);
if(isset($_COOKIE['test'])){
    echo 'success';
}







